<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">

	<title>DWDownloadSessionManager Class Reference</title>

	<link rel="stylesheet" href="../css/style.css">
	<meta name="viewport" content="initial-scale=1, maximum-scale=1.4">
	<meta name="generator" content="appledoc 2.2.1 (build 1334)">
</head>
<body class="appledoc">
	<header>
		<div class="container" class="hide-in-xcode">
			
			<h1 id="library-title">
				<a href="../index.html">bokecc </a>
			</h1>

			<p id="developer-home">
				<a href="../index.html">com.bokecc</a>
			</p>
			
		</div>
	</header>

	<aside>
		<div class="container">
			<nav>
				<ul id="header-buttons" role="toolbar">
					<li><a href="../index.html">Index</a></li>
<li><a href="../hierarchy.html">Hierarchy</a></li>

					<li id="on-this-page" role="navigation">
						<label>
							On This Page

							<div class="chevron">
								<div class="chevy chevron-left"></div>
								<div class="chevy chevron-right"></div>
							</div>

							<select id="jump-to">
	<option value="top">Jump To&#133;</option>
	

	
	
	<option value="tasks">Tasks</option>
	
	

	
	
	<optgroup label="Properties">
		
		<option value="//api/name/allowsCellular">allowsCellular</option>
		
		<option value="//api/name/delegate">delegate</option>
		
		<option value="//api/name/downloadModelList">downloadModelList</option>
		
		<option value="//api/name/isBatchDownload">isBatchDownload</option>
		
		<option value="//api/name/maxDownloadCount">maxDownloadCount</option>
		
		<option value="//api/name/resumeDownloadFIFO">resumeDownloadFIFO</option>
		
	</optgroup>
	

	
	<optgroup label="Class Methods">
		
		<option value="//api/name/createDownloadModel:Quality:AndOthersInfo:">+ createDownloadModel:Quality:AndOthersInfo:</option>
		
		<option value="//api/name/manager">+ manager</option>
		
	</optgroup>
	

	
	<optgroup label="Instance Methods">
		
		<option value="//api/name/HDURLSessionDownloadTask:didFinishDownloadingToURL:">- HDURLSessionDownloadTask:didFinishDownloadingToURL:</option>
		
		<option value="//api/name/HDURLSessionDownloadTask:didWriteData:totalBytesWritten:totalBytesExpectedToWrite:">- HDURLSessionDownloadTask:didWriteData:totalBytesWritten:totalBytesExpectedToWrite:</option>
		
		<option value="//api/name/checkLocalResourceWithVideoId:WithQuality:">- checkLocalResourceWithVideoId:WithQuality:</option>
		
		<option value="//api/name/deleteAllDownloadModel">- deleteAllDownloadModel</option>
		
		<option value="//api/name/deleteWithDownloadModel:">- deleteWithDownloadModel:</option>
		
		<option value="//api/name/downLoadingModelForURLString:">- downLoadingModelForURLString:</option>
		
		<option value="//api/name/isValidateURLWithDownloadModel:">- isValidateURLWithDownloadModel:</option>
		
		<option value="//api/name/migrateDownloadTask:DownloadUrl:MediaType:Quality:Desp:VRMode:OthersInfo:UserId:VideoId:TotalBytesWritten:TotalBytesExpectedToWrite:">- migrateDownloadTask:DownloadUrl:MediaType:Quality:Desp:VRMode:OthersInfo:UserId:VideoId:TotalBytesWritten:TotalBytesExpectedToWrite:</option>
		
		<option value="//api/name/reStartDownloadUrlWithNewUrlString:AndDownloadModel:">- reStartDownloadUrlWithNewUrlString:AndDownloadModel:</option>
		
		<option value="//api/name/resumeWithDownloadModel:">- resumeWithDownloadModel:</option>
		
		<option value="//api/name/setBackgroundSession:CompletionHandler:">- setBackgroundSession:CompletionHandler:</option>
		
		<option value="//api/name/startWithDownloadModel:">- startWithDownloadModel:</option>
		
		<option value="//api/name/startWithDownloadModel:progress:state:">- startWithDownloadModel:progress:state:</option>
		
		<option value="//api/name/suspendAllDownloadModel">- suspendAllDownloadModel</option>
		
		<option value="//api/name/suspendWithDownloadModel:">- suspendWithDownloadModel:</option>
		
	</optgroup>
	
	
</select>
						</label>
					</li>
				</ul>
			</nav>
		</div>
	</aside>

	<article>
		<div id="overview_contents" class="container">
			<div id="content">
				<main role="main">
					<h1 class="title">DWDownloadSessionManager Class Reference</h1>

					
					<div class="section section-specification"><table cellspacing="0"><tbody>
						<tr>
	<th>Inherits from</th>
	<td>NSObject</td>
</tr><tr>
	<th>Declared in</th>
	<td>DWDownloadSessionManager.h<br />DWDownloadSessionManager.m</td>
</tr>
						</tbody></table></div>
					

                    

					
					
					<div class="section section-tasks">
						<a title="Tasks" name="tasks"></a>
						

						
						<h2 class="task-title">Other Methods</h2>

						<div class="task-list">
							<div class="section-method">
	<a name="//api/name/downloadModelList" title="downloadModelList"></a>
	<h3 class="method-title"><code><a href="#//api/name/downloadModelList">&nbsp;&nbsp;downloadModelList</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>下载任务队列</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>@property (nonatomic, strong, readonly) NSArray&lt;DWDownloadModel*&gt; *downloadModelList</code></div>

		    
			

			

			

			
			<div class="method-subsection discussion-section">
				<h4 class="method-subtitle">Discussion</h4>
				<p>下载任务队列</p>
			</div>
			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">DWDownloadSessionManager.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/delegate" title="delegate"></a>
	<h3 class="method-title"><code><a href="#//api/name/delegate">&nbsp;&nbsp;delegate</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>代理</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>@property (nonatomic, weak) id&lt;DWDownloadSessionDelegate&gt; delegate</code></div>

		    
			

			

			

			
			<div class="method-subsection discussion-section">
				<h4 class="method-subtitle">Discussion</h4>
				<p>代理</p>
			</div>
			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">DWDownloadSessionManager.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/allowsCellular" title="allowsCellular"></a>
	<h3 class="method-title"><code><a href="#//api/name/allowsCellular">&nbsp;&nbsp;allowsCellular</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>是否允许使用移动流量 YES支持 NO不支持 默认支持</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>@property (nonatomic, assign) BOOL allowsCellular</code></div>

		    
			

			

			

			
			<div class="method-subsection discussion-section">
				<h4 class="method-subtitle">Discussion</h4>
				<p>是否允许使用移动流量 YES支持 NO不支持 默认支持</p>
			</div>
			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">DWDownloadSessionManager.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/isBatchDownload" title="isBatchDownload"></a>
	<h3 class="method-title"><code><a href="#//api/name/isBatchDownload">&nbsp;&nbsp;isBatchDownload</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>全部并发 默认YES, 当YES时，忽略<a href="#//api/name/maxDownloadCount">maxDownloadCount</a></p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>@property (nonatomic, assign) BOOL isBatchDownload</code></div>

		    
			

			

			

			
			<div class="method-subsection discussion-section">
				<h4 class="method-subtitle">Discussion</h4>
				<p>全部并发 默认YES, 当YES时，忽略<a href="#//api/name/maxDownloadCount">maxDownloadCount</a></p>
			</div>
			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">DWDownloadSessionManager.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/maxDownloadCount" title="maxDownloadCount"></a>
	<h3 class="method-title"><code><a href="#//api/name/maxDownloadCount">&nbsp;&nbsp;maxDownloadCount</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>允许同时下载的最大并发数,默认为1，最大为4</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>@property (nonatomic, assign) NSInteger maxDownloadCount</code></div>

		    
			

			

			

			
			<div class="method-subsection discussion-section">
				<h4 class="method-subtitle">Discussion</h4>
				<p>允许同时下载的最大并发数,默认为1，最大为4</p>
			</div>
			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">DWDownloadSessionManager.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/resumeDownloadFIFO" title="resumeDownloadFIFO"></a>
	<h3 class="method-title"><code><a href="#//api/name/resumeDownloadFIFO">&nbsp;&nbsp;resumeDownloadFIFO</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>等待下载队列 先进先出 默认YES， 当NO时，先进后出</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>@property (nonatomic, assign) BOOL resumeDownloadFIFO</code></div>

		    
			

			

			

			
			<div class="method-subsection discussion-section">
				<h4 class="method-subtitle">Discussion</h4>
				<p>等待下载队列 先进先出 默认YES， 当NO时，先进后出</p>
			</div>
			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">DWDownloadSessionManager.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/manager" title="manager"></a>
	<h3 class="method-title"><code><a href="#//api/name/manager">+&nbsp;manager</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>初始化DWDownloadSessionManager</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>+ (DWDownloadSessionManager *)manager</code></div>

		    
			

			
			<div class="method-subsection return">
				<h4 class="method-subtitle parameter-title">Return Value</h4>
				<p>DWDownloadSessionManager对象</p>
			</div>
			

			

			
			<div class="method-subsection discussion-section">
				<h4 class="method-subtitle">Discussion</h4>
				<p>初始化DWDownloadSessionManager</p>
			</div>
			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">DWDownloadSessionManager.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/createDownloadModel:Quality:AndOthersInfo:" title="createDownloadModel:Quality:AndOthersInfo:"></a>
	<h3 class="method-title"><code><a href="#//api/name/createDownloadModel:Quality:AndOthersInfo:">+&nbsp;createDownloadModel:Quality:AndOthersInfo:</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<ul>
<li>初始化<a href="../Classes/DWDownloadModel.html">DWDownloadModel</a></li>
</ul>

			</div>
			
		    

			<div class="method-subsection method-declaration"><code>+ (DWDownloadModel *)createDownloadModel:(DWVodVideoModel *)<em>videoMdoel</em> Quality:(NSString *)<em>quality</em> AndOthersInfo:(NSDictionary *)<em>othersInfo</em></code></div>

		    
			
			<div class="method-subsection arguments-section parameters">
				<h4 class="method-subtitle parameter-title">Parameters</h4>
				<table class="argument-def parameter-def">
				
					<tr>
						<th scope="row" class="argument-name"><code>videoMdoel</code></th>
						<td><p>点播视频model 非空</p></td>
					</tr>
				
					<tr>
						<th scope="row" class="argument-name"><code>quality</code></th>
						<td><p>媒体品质 非空</p></td>
					</tr>
				
					<tr>
						<th scope="row" class="argument-name"><code>othersInfo</code></th>
						<td><p>自定义字段 可为空</p></td>
					</tr>
				
				</table>
			</div>
			

			
			<div class="method-subsection return">
				<h4 class="method-subtitle parameter-title">Return Value</h4>
				<p>创建成功返回DWDownloadModel对象，如果失败，返回nil</p>
			</div>
			

			

			
			<div class="method-subsection discussion-section">
				<h4 class="method-subtitle">Discussion</h4>
				<ul>
<li>初始化<a href="../Classes/DWDownloadModel.html">DWDownloadModel</a></li>
</ul>

			</div>
			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">DWDownloadSessionManager.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/startWithDownloadModel:" title="startWithDownloadModel:"></a>
	<h3 class="method-title"><code><a href="#//api/name/startWithDownloadModel:">&ndash;&nbsp;startWithDownloadModel:</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>开始下载任务</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (void)startWithDownloadModel:(DWDownloadModel *)<em>downloadModel</em></code></div>

		    
			
			<div class="method-subsection arguments-section parameters">
				<h4 class="method-subtitle parameter-title">Parameters</h4>
				<table class="argument-def parameter-def">
				
					<tr>
						<th scope="row" class="argument-name"><code>downloadModel</code></th>
						<td><p>DWDownloadModel对象</p></td>
					</tr>
				
				</table>
			</div>
			

			

			

			
			<div class="method-subsection discussion-section">
				<h4 class="method-subtitle">Discussion</h4>
				<p>开始下载任务</p>
			</div>
			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">DWDownloadSessionManager.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/startWithDownloadModel:progress:state:" title="startWithDownloadModel:progress:state:"></a>
	<h3 class="method-title"><code><a href="#//api/name/startWithDownloadModel:progress:state:">&ndash;&nbsp;startWithDownloadModel:progress:state:</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>开始下载任务 ，所有回调均已回到主线程中</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (void)startWithDownloadModel:(DWDownloadModel *)<em>downloadModel</em> progress:(DWDownloadProgressBlock)<em>progress</em> state:(DWDownloadStateBlock)<em>state</em></code></div>

		    
			
			<div class="method-subsection arguments-section parameters">
				<h4 class="method-subtitle parameter-title">Parameters</h4>
				<table class="argument-def parameter-def">
				
					<tr>
						<th scope="row" class="argument-name"><code>downloadModel</code></th>
						<td><p>DWDownloadModel对象</p></td>
					</tr>
				
					<tr>
						<th scope="row" class="argument-name"><code>progress</code></th>
						<td><p>下载进度回调</p></td>
					</tr>
				
					<tr>
						<th scope="row" class="argument-name"><code>state</code></th>
						<td><p>下载状态变动回调</p></td>
					</tr>
				
				</table>
			</div>
			

			

			

			
			<div class="method-subsection discussion-section">
				<h4 class="method-subtitle">Discussion</h4>
				<p>开始下载任务 ，所有回调均已回到主线程中</p>
			</div>
			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">DWDownloadSessionManager.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/suspendWithDownloadModel:" title="suspendWithDownloadModel:"></a>
	<h3 class="method-title"><code><a href="#//api/name/suspendWithDownloadModel:">&ndash;&nbsp;suspendWithDownloadModel:</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>暂停下载任务</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (void)suspendWithDownloadModel:(DWDownloadModel *)<em>downloadModel</em></code></div>

		    
			
			<div class="method-subsection arguments-section parameters">
				<h4 class="method-subtitle parameter-title">Parameters</h4>
				<table class="argument-def parameter-def">
				
					<tr>
						<th scope="row" class="argument-name"><code>downloadModel</code></th>
						<td><p>DWDownloadModel对象</p></td>
					</tr>
				
				</table>
			</div>
			

			

			

			
			<div class="method-subsection discussion-section">
				<h4 class="method-subtitle">Discussion</h4>
				<p>暂停下载任务</p>
			</div>
			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">DWDownloadSessionManager.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/resumeWithDownloadModel:" title="resumeWithDownloadModel:"></a>
	<h3 class="method-title"><code><a href="#//api/name/resumeWithDownloadModel:">&ndash;&nbsp;resumeWithDownloadModel:</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>恢复下载任务</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (void)resumeWithDownloadModel:(DWDownloadModel *)<em>downloadModel</em></code></div>

		    
			
			<div class="method-subsection arguments-section parameters">
				<h4 class="method-subtitle parameter-title">Parameters</h4>
				<table class="argument-def parameter-def">
				
					<tr>
						<th scope="row" class="argument-name"><code>downloadModel</code></th>
						<td><p>DWDownloadModel对象</p></td>
					</tr>
				
				</table>
			</div>
			

			

			

			
			<div class="method-subsection discussion-section">
				<h4 class="method-subtitle">Discussion</h4>
				<p>恢复下载任务</p>
			</div>
			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">DWDownloadSessionManager.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/deleteWithDownloadModel:" title="deleteWithDownloadModel:"></a>
	<h3 class="method-title"><code><a href="#//api/name/deleteWithDownloadModel:">&ndash;&nbsp;deleteWithDownloadModel:</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>删除下载任务以及本地缓存</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (void)deleteWithDownloadModel:(DWDownloadModel *)<em>downloadModel</em></code></div>

		    
			
			<div class="method-subsection arguments-section parameters">
				<h4 class="method-subtitle parameter-title">Parameters</h4>
				<table class="argument-def parameter-def">
				
					<tr>
						<th scope="row" class="argument-name"><code>downloadModel</code></th>
						<td><p>DWDownloadModel对象</p></td>
					</tr>
				
				</table>
			</div>
			

			

			

			
			<div class="method-subsection discussion-section">
				<h4 class="method-subtitle">Discussion</h4>
				<p>删除下载任务以及本地缓存</p>
			</div>
			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">DWDownloadSessionManager.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/suspendAllDownloadModel" title="suspendAllDownloadModel"></a>
	<h3 class="method-title"><code><a href="#//api/name/suspendAllDownloadModel">&ndash;&nbsp;suspendAllDownloadModel</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>暂停全部任务</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (void)suspendAllDownloadModel</code></div>

		    
			

			

			

			
			<div class="method-subsection discussion-section">
				<h4 class="method-subtitle">Discussion</h4>
				<p>暂停全部任务</p>
			</div>
			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">DWDownloadSessionManager.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/deleteAllDownloadModel" title="deleteAllDownloadModel"></a>
	<h3 class="method-title"><code><a href="#//api/name/deleteAllDownloadModel">&ndash;&nbsp;deleteAllDownloadModel</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>删除全部任务</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (void)deleteAllDownloadModel</code></div>

		    
			

			

			

			
			<div class="method-subsection discussion-section">
				<h4 class="method-subtitle">Discussion</h4>
				<p>删除全部任务</p>
			</div>
			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">DWDownloadSessionManager.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/downLoadingModelForURLString:" title="downLoadingModelForURLString:"></a>
	<h3 class="method-title"><code><a href="#//api/name/downLoadingModelForURLString:">&ndash;&nbsp;downLoadingModelForURLString:</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>获取下载模型</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (DWDownloadModel *)downLoadingModelForURLString:(NSString *)<em>URLString</em></code></div>

		    
			
			<div class="method-subsection arguments-section parameters">
				<h4 class="method-subtitle parameter-title">Parameters</h4>
				<table class="argument-def parameter-def">
				
					<tr>
						<th scope="row" class="argument-name"><code>URLString</code></th>
						<td><p>下载地址</p></td>
					</tr>
				
				</table>
			</div>
			

			
			<div class="method-subsection return">
				<h4 class="method-subtitle parameter-title">Return Value</h4>
				<p>DWDownloadModel对象</p>
			</div>
			

			

			
			<div class="method-subsection discussion-section">
				<h4 class="method-subtitle">Discussion</h4>
				<p>获取下载模型</p>
			</div>
			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">DWDownloadSessionManager.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/checkLocalResourceWithVideoId:WithQuality:" title="checkLocalResourceWithVideoId:WithQuality:"></a>
	<h3 class="method-title"><code><a href="#//api/name/checkLocalResourceWithVideoId:WithQuality:">&ndash;&nbsp;checkLocalResourceWithVideoId:WithQuality:</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>判断当前资源是已在下载队列中</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (BOOL)checkLocalResourceWithVideoId:(NSString *)<em>videoId</em> WithQuality:(NSString *)<em>quality</em></code></div>

		    
			
			<div class="method-subsection arguments-section parameters">
				<h4 class="method-subtitle parameter-title">Parameters</h4>
				<table class="argument-def parameter-def">
				
					<tr>
						<th scope="row" class="argument-name"><code>videoId</code></th>
						<td><p>视频id  非空</p></td>
					</tr>
				
					<tr>
						<th scope="row" class="argument-name"><code>quality</code></th>
						<td><p>媒体品质 非空</p></td>
					</tr>
				
				</table>
			</div>
			

			
			<div class="method-subsection return">
				<h4 class="method-subtitle parameter-title">Return Value</h4>
				<p>YES 已存在  NO 未存在</p>
			</div>
			

			

			
			<div class="method-subsection discussion-section">
				<h4 class="method-subtitle">Discussion</h4>
				<p>判断当前资源是已在下载队列中</p>
			</div>
			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">DWDownloadSessionManager.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/isValidateURLWithDownloadModel:" title="isValidateURLWithDownloadModel:"></a>
	<h3 class="method-title"><code><a href="#//api/name/isValidateURLWithDownloadModel:">&ndash;&nbsp;isValidateURLWithDownloadModel:</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>判断downloadModel下载链接是否有效</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (BOOL)isValidateURLWithDownloadModel:(DWDownloadModel *)<em>downloadModel</em></code></div>

		    
			
			<div class="method-subsection arguments-section parameters">
				<h4 class="method-subtitle parameter-title">Parameters</h4>
				<table class="argument-def parameter-def">
				
					<tr>
						<th scope="row" class="argument-name"><code>downloadModel</code></th>
						<td><p>DWDownloadModel对象</p></td>
					</tr>
				
				</table>
			</div>
			

			
			<div class="method-subsection return">
				<h4 class="method-subtitle parameter-title">Return Value</h4>
				<p>YES有效 NO无效，需重新获取下载链接</p>
			</div>
			

			

			
			<div class="method-subsection discussion-section">
				<h4 class="method-subtitle">Discussion</h4>
				<p>判断downloadModel下载链接是否有效</p>
			</div>
			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">DWDownloadSessionManager.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/reStartDownloadUrlWithNewUrlString:AndDownloadModel:" title="reStartDownloadUrlWithNewUrlString:AndDownloadModel:"></a>
	<h3 class="method-title"><code><a href="#//api/name/reStartDownloadUrlWithNewUrlString:AndDownloadModel:">&ndash;&nbsp;reStartDownloadUrlWithNewUrlString:AndDownloadModel:</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>根据新的下载地址，继续下载此任务</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (void)reStartDownloadUrlWithNewUrlString:(NSString *)<em>newUrlString</em> AndDownloadModel:(DWDownloadModel *)<em>downloadModel</em></code></div>

		    
			
			<div class="method-subsection arguments-section parameters">
				<h4 class="method-subtitle parameter-title">Parameters</h4>
				<table class="argument-def parameter-def">
				
					<tr>
						<th scope="row" class="argument-name"><code>newUrlString</code></th>
						<td><p>新的下载地址</p></td>
					</tr>
				
					<tr>
						<th scope="row" class="argument-name"><code>downloadModel</code></th>
						<td><p>需要修改的downloadModel</p></td>
					</tr>
				
				</table>
			</div>
			

			

			

			
			<div class="method-subsection discussion-section">
				<h4 class="method-subtitle">Discussion</h4>
				<p>根据新的下载地址，继续下载此任务</p>
			</div>
			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">DWDownloadSessionManager.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/setBackgroundSession:CompletionHandler:" title="setBackgroundSession:CompletionHandler:"></a>
	<h3 class="method-title"><code><a href="#//api/name/setBackgroundSession:CompletionHandler:">&ndash;&nbsp;setBackgroundSession:CompletionHandler:</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>获取appdelegate，handleEventsForBackgroundURLSession事件回调</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (void)setBackgroundSession:(NSString *)<em>identifier</em> CompletionHandler:(void ( ^ ) ( ))<em>completionHandler</em></code></div>

		    
			
			<div class="method-subsection arguments-section parameters">
				<h4 class="method-subtitle parameter-title">Parameters</h4>
				<table class="argument-def parameter-def">
				
					<tr>
						<th scope="row" class="argument-name"><code>identifier</code></th>
						<td><p>identifier</p></td>
					</tr>
				
					<tr>
						<th scope="row" class="argument-name"><code>completionHandler</code></th>
						<td><p>completionHandler</p></td>
					</tr>
				
				</table>
			</div>
			

			

			

			
			<div class="method-subsection discussion-section">
				<h4 class="method-subtitle">Discussion</h4>
				<p>获取appdelegate，handleEventsForBackgroundURLSession事件回调</p>
			</div>
			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">DWDownloadSessionManager.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/migrateDownloadTask:DownloadUrl:MediaType:Quality:Desp:VRMode:OthersInfo:UserId:VideoId:TotalBytesWritten:TotalBytesExpectedToWrite:" title="migrateDownloadTask:DownloadUrl:MediaType:Quality:Desp:VRMode:OthersInfo:UserId:VideoId:TotalBytesWritten:TotalBytesExpectedToWrite:"></a>
	<h3 class="method-title"><code><a href="#//api/name/migrateDownloadTask:DownloadUrl:MediaType:Quality:Desp:VRMode:OthersInfo:UserId:VideoId:TotalBytesWritten:TotalBytesExpectedToWrite:">&ndash;&nbsp;migrateDownloadTask:DownloadUrl:MediaType:Quality:Desp:VRMode:OthersInfo:UserId:VideoId:TotalBytesWritten:TotalBytesExpectedToWrite:</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>若从3.x.x版本升级到4.x.x，会出现旧版本下载的音视频文件找不到的情况。
可以通过执行此方法，生成新版SDk的下载任务。</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (DWDownloadModel *)migrateDownloadTask:(NSString *)<em>loaclPath</em> DownloadUrl:(NSString *)<em>downloadUrl</em> MediaType:(NSString *)<em>mediaType</em> Quality:(NSString *)<em>quality</em> Desp:(NSString *)<em>desp</em> VRMode:(BOOL)<em>vrMode</em> OthersInfo:(NSDictionary *)<em>othersInfo</em> UserId:(NSString *)<em>userId</em> VideoId:(NSString *)<em>videoId</em> TotalBytesWritten:(int64_t)<em>totalBytesWritten</em> TotalBytesExpectedToWrite:(int64_t)<em>totalBytesExpectedToWrite</em></code></div>

		    
			
			<div class="method-subsection arguments-section parameters">
				<h4 class="method-subtitle parameter-title">Parameters</h4>
				<table class="argument-def parameter-def">
				
					<tr>
						<th scope="row" class="argument-name"><code>loaclPath</code></th>
						<td><p>对于已完成的任务，必填。对于未完成的任务，请务必传nil</p></td>
					</tr>
				
					<tr>
						<th scope="row" class="argument-name"><code>downloadUrl</code></th>
						<td><p>网络下载地址。对于未完成的任务，必填</p></td>
					</tr>
				
					<tr>
						<th scope="row" class="argument-name"><code>mediaType</code></th>
						<td><p>文件类型 1 视频 2 音频。 若不填写，默认视频</p></td>
					</tr>
				
					<tr>
						<th scope="row" class="argument-name"><code>quality</code></th>
						<td><p>清晰度。 若不填写，默认 10</p></td>
					</tr>
				
					<tr>
						<th scope="row" class="argument-name"><code>desp</code></th>
						<td><p>清晰度描述。 若不填写，默认 标清</p></td>
					</tr>
				
					<tr>
						<th scope="row" class="argument-name"><code>vrMode</code></th>
						<td><p>是否是VR视频。 默认</p></td>
					</tr>
				
					<tr>
						<th scope="row" class="argument-name"><code>othersInfo</code></th>
						<td><p>自定义字段 根据自己需求适当添加，比如添加媒体图片，标题等。</p></td>
					</tr>
				
					<tr>
						<th scope="row" class="argument-name"><code>userId</code></th>
						<td><p>用户ID。 选填</p></td>
					</tr>
				
					<tr>
						<th scope="row" class="argument-name"><code>videoId</code></th>
						<td><p>视频ID。 选填</p></td>
					</tr>
				
					<tr>
						<th scope="row" class="argument-name"><code>totalBytesWritten</code></th>
						<td><p>已下载的数量。对于未完成的任务，必填</p></td>
					</tr>
				
					<tr>
						<th scope="row" class="argument-name"><code>totalBytesExpectedToWrite</code></th>
						<td><p>文件的总大小。对于未完成的任务，必填</p></td>
					</tr>
				
				</table>
			</div>
			

			
			<div class="method-subsection return">
				<h4 class="method-subtitle parameter-title">Return Value</h4>
				<p>若过渡成功，返回DWDownloadModel对象，否则返回nil</p>
			</div>
			

			

			
			<div class="method-subsection discussion-section">
				<h4 class="method-subtitle">Discussion</h4>
				<p>若从3.x.x版本升级到4.x.x，会出现旧版本下载的音视频文件找不到的情况。
可以通过执行此方法，生成新版SDk的下载任务。</p>
			</div>
			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">DWDownloadSessionManager.h</code></p>
			</div>
			
			
		</div>
	</div>
</div>
						</div>
						

						
						<h2 class="task-title">Other Methods</h2>

						<div class="task-list">
							<div class="section-method">
	<a name="//api/name/HDURLSessionDownloadTask:didWriteData:totalBytesWritten:totalBytesExpectedToWrite:" title="HDURLSessionDownloadTask:didWriteData:totalBytesWritten:totalBytesExpectedToWrite:"></a>
	<h3 class="method-title"><code><a href="#//api/name/HDURLSessionDownloadTask:didWriteData:totalBytesWritten:totalBytesExpectedToWrite:">&ndash;&nbsp;HDURLSessionDownloadTask:didWriteData:totalBytesWritten:totalBytesExpectedToWrite:</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>下载进度监听</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (void)HDURLSessionDownloadTask:(NSURLSessionDownloadTask *)<em>downloadTask</em> didWriteData:(int64_t)<em>bytesWritten</em> totalBytesWritten:(int64_t)<em>totalBytesWritten</em> totalBytesExpectedToWrite:(int64_t)<em>totalBytesExpectedToWrite</em></code></div>

		    
			

			

			

			
			<div class="method-subsection discussion-section">
				<h4 class="method-subtitle">Discussion</h4>
				<p>下载进度监听</p>
			</div>
			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">DWDownloadSessionManager.m</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/HDURLSessionDownloadTask:didFinishDownloadingToURL:" title="HDURLSessionDownloadTask:didFinishDownloadingToURL:"></a>
	<h3 class="method-title"><code><a href="#//api/name/HDURLSessionDownloadTask:didFinishDownloadingToURL:">&ndash;&nbsp;HDURLSessionDownloadTask:didFinishDownloadingToURL:</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>下载完成</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (void)HDURLSessionDownloadTask:(NSURLSessionDownloadTask *)<em>downloadTask</em> didFinishDownloadingToURL:(NSURL *)<em>location</em></code></div>

		    
			

			

			

			
			<div class="method-subsection discussion-section">
				<h4 class="method-subtitle">Discussion</h4>
				<p>下载完成</p>
			</div>
			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">DWDownloadSessionManager.m</code></p>
			</div>
			
			
		</div>
	</div>
</div>
						</div>
						
					</div>
					
					

                    
                    
          
				</main>

				<footer>
					<div class="footer-copyright">
						
						<p class="copyright">Copyright &copy; 2020 com.bokecc. All rights reserved. Updated: 2020-07-14</p>
						
						
						<p class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2.1 (build 1334)</a>.</p>
						
					</div>
				</footer>
			</div>
		</div>
	</article>

	<script src="../js/script.js"></script>
</body>
</html>